memcpy proc public uses esi edi Dest:PTR BYTE,Source:PTR BYTE,ln:DWORD
	cld
	mov esi, [Source]
	mov edi, [Dest]
	mov ecx, [ln]
	
	shr ecx, 2
	rep movsd
	
	mov ecx, [ln]
	and ecx, 3
	rep movsb
	ret
    
memcpy endp
ResizeWindow proc uses ebx edi esi hwnd:DWORD,lpRect:DWORD,move:WORD
	LOCAL @rect:RECT
	invoke RtlZeroMemory,addr @rect,sizeof @rect
	invoke GetWindowRect,hwnd,addr @rect
	mov ebx,lpRect
	assume ebx:ptr RECT
	mov eax,[ebx].right
	sub eax,[ebx].left
	mov ecx,[ebx].bottom
	sub ecx,[ebx].top
	push eax
	push ecx
	.if move

	
	.else
		push @rect.left
		pop [ebx].left
		push @rect.top
		pop [ebx].top
	.endif
	pop ecx
	pop eax
	
	
	
	invoke MoveWindow,hwnd,[ebx].left,[ebx].top,eax,ecx,TRUE
	invoke memcpy,lpRect,addr @rect,sizeof @rect
	mov eax,TRUE
	ret
ResizeWindow endp